<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	  <%@include file="/res/include/base-head.jsp"%>
	  <%@include file="/res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/user/userBase.js"></script>
  </head>
  <body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
	            <dl>
					<dt>昵称：</dt>
					<dd>
						<input name="nick" id="nick" type="text" class="txt" maxlength="16"/>
					</dd>
				</dl>
				<dl>
					<dt>帐号：</dt>
					<dd>
						<input name="searchMore" id="searchMore" type="text" class="txt" maxlength="32"/>
					</dd>
				</dl>
				<dl>
					<dt>身份认证：</dt>
					<dd>
						<select name="hasIdentityAuth" id="hasIdentityAuth" class="txt grid-8">
							<option value="">请选择</option>
							<option value="1">已认证</option>
							<option value="2">未认证</option>
						</select>
					</dd>
				</dl>
				<dl>
	            	<dt>注册时间：从</dt>
	                <dd>
		                <input name="startAtStr" id="startAtStr" type="text" class="txt easyui-datetimebox" maxlength="19"/> 到 
		                <input name="endAtStr" id="endAtStr" type="text" class="txt easyui-datetimebox" maxlength="19"/>
	                </dd>
	            </dl>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.userBase.query()" />
	            </p>
	            <dl></dl>
	            <p class="search_form_btn">
	            	<input type="button" value="导出excel" class="icon_serach" onclick="admin.userBase.export2Excel()" />
	            </p>
	        </form>
	  	</div>
	    <div data-options="region:'center',border:false">
		    <table id="datagrid" data-options="url:'${pageContext.request.contextPath}/user/base/list',toolbar:'#toolbar'">
				<thead>
					<tr>
						<th data-options="field:'nick',width:100,align:'center'">昵称</th>
						<th data-options="field:'sexDesc',width:100,align:'center'">性别</th>
						<th data-options="field:'typeDesc',width:200,align:'center' ">帐号类型</th>
						<th data-options="field:'userIdentity',width:200,align:'center' ">帐号</th>
						<th data-options="field:'strNewAt',width:150,align:'center'">注册时间</th>
			            <th data-options="field:'id',align:'center',width:350,formatter:formatOperation">操作</th>
					</tr>
				</thead>
			</table>
	  	</div>
	</div>

	<script>
	function formatIsOfficial(value,row,index) {
		var l_html = '';
		if (value==1) {
			l_html = '官方';
		}else{
			l_html = '否';
		}
		return l_html;
	}
	function formatHasIdentityAuth(value,row,index) {
		var l_html = '未认证';
		if (value==1) {
			l_html = '已认证';
		}
		return l_html;
	}
	function formatOperation(value,row,index) {
		var isOfficial = row.isOfficial;//1:官方；2:非官方
		var l_html = '';
		l_html += '<a href="javascript:;" class="table_link" onclick="admin.userBase.sendMoneyAdd('+row.id+')">赠送圈币</a>';
		return l_html;
	}
	</script>
  </body>
</html>
